<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
<script src="test.js"></script>
<script src="../../xpath-test-pre.js"></script>
</head>
<body>
<div id="console"></div>

<script>
    result = DOM.evaluate("//*", CHILD2, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
    checkSnapshot("//*", result, [ROOT, CHILD1].concat(GCHILDREN1, [CHILD2], GCHILDREN2, [CHILD3, LANG], LCHILDREN));

    result = DOM.evaluate("*/*", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
    checkSnapshot("*/*", result, GCHILDREN1.concat(GCHILDREN2, LCHILDREN));

    result = DOM.evaluate("/", CHILD1, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    checkSnapshot("/", result, [DOM]);

    result = DOM.evaluate("/child::*", CHILD2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    checkSnapshot("/child::*", result, [ROOT]);

    result = DOM.evaluate("child::*/child::*", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
    checkSnapshot("child::*/child::*", result, GCHILDREN1.concat(GCHILDREN2, LCHILDREN));

</script>
</body>
</html>
